<template>
  <div class="home">
    <h1 class="title">首页</h1>
    <Button type="primary" @click="handleClick">{{ count }}</Button>
    <Button>Test</Button>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomePage',
  data () {
    return {}
  },
  computed: {
    ...mapState(['count'])
  },
  methods: {
    handleClick () {
      this.$store.commit('increment')
    }
  }
}
</script>

<style lang="less" scoped>
.home {
  height: 100%;
  background-color: pink;
  .title {
    color: @test-color;
  }
}
</style>
